package com.mt.api.modules.controller;

import com.mt.api.task.ComputeWeightTask;
import com.mt.common.response.WebResponse;
import com.mt.common.response.WebResponseUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: plover
 * @Date: 2022/01/05 5:15 下午
 * @Description:
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/app/task")
public class AppTaskController {

    private final ComputeWeightTask computeWeightTask;

    @GetMapping("/compute/weight")
    public WebResponse computeWeightTask(){
        computeWeightTask.run();
        return WebResponseUtils.success();
    }
}
